{extend name='layout/layoutname' /}
{block name='head'}
	<title>财务报表—蚁巢众筹</title>
	<link rel="stylesheet" href="/static/css/earnings.css" />
{/block}
{block name='body'}
	<div class="scroll" id='earnings_scroll'>
		<div class="scroll_picture" id='earnings_bg'>
		{if condition="$user"}
			<div class="sign_out sign earning_position">
				<p>账户信息</p>
				<p><span>账户:</span>
					<span>{$user['username'] ? $user['username'] : $user['mobile']}</span>
					<a href="javascript:;" onclick="history.go(0)">刷新</a>
				</p>
				<p>
					<span>总资金:</span>
					<span>{$user['total_funds']}</span>
				</p>
				<p>
					<span>可用资金:</span>
					<span>{$user['available_funds']}</span>
				</p>
				<p>
					<span>佣金:</span>
					<span>{$user['commission']}</span>
				</p>
				<button onclick='signout(this,"{:url('index/index/signout')}")'>安全退出</button>
			</div>
		{else/}	
			<div id='earnings_sign_in' class="sign_in sign" style="background:rgba(32,45,51,0.6);">
				<input type="text" name="mobile" class="phone_num input" style="background-color: white;" placeholder="请输入手机号码"/>
				<input type="password" name="password" class="password input" style="background-color: white;" placeholder="请输入密码"/>
				<div class="link" id='earnings_link'>
					<a href="#" class="register">立即注册</a>
				    <a href="#" class="forget_pass">忘记密码?</a>
				</div>
				<input type="button" onclick='signin(this,"{:url('index/index/login')}")' value="登录" class="sign_in_block"/>
			</div>
		{/if}
		</div>
		<div class="notice">
			<div class="official_notice">官网公告</div>
			<span class="notice_title">{$notice[0]['n_title']}</span>
		</div>
	</div>
	<div class="business" id='earnings_business'>
		<div class="main_center center">
			<div class="f_forms">
				<p>财务报表</p>
				<ul class="forms_list">
					<img src="/static/img/f_detail.png" alt="" class="f_small_ico"/>
					<li class="detail_color">众筹记录</li>
					<li>佣金记录</li>
					<li>充值订单</li>
					<li>提现记录</li>
				</ul>
			</div>
			<div>  <!--防止siblings出错-->
				<div class="f_record show_hide">
					<p>众筹记录</p>
					<table border="1" cellspacing="0" cellpadding="0">
		               	<tr>
		               		<th>开始时间</th>
		               		<th>名称</th>
		               		<th>每份价格</th>
		               		<th>总周期</th>
		               		<th>剩余天数</th>
		               		<th>每份收益</th>
		               		<th>购买份额</th>
		               		<th>状态</th>
		               	</tr>
		               	{foreach $machine as $v}
		               	<tr>
		               		<td>{$v.start}</td>
		               		<td>{$v.typename}</td>
		               		<td>{$v.price}</td>
		               		<td>{$v.lifetime}</td>
		               		<td>{$v.left_days}</td>
		               		<td>{$v.candy_total}</td>
		               		<td>{$v.counts}</td>
		               		<td>{$v.status?'已完成':'生产中'}</td>
		               	</tr>
		               	{/foreach}
		           </table>
				</div>
				<div class="show_hide broketage">
					<p>佣金记录-详情</p>
	               <table border="1" cellspacing="0" cellpadding="0">
	               	<tr>
	               		<th>时间</th>
	               		<th>下级账户</th>
	               		<th>奖励佣金</th>
	               		<th>佣金来源</th>
	               	</tr>
	            {foreach $charge as $v}
	               	<tr>
	               		<td>{$v.log_time}</td>
	               		<td>{$v.junior_name}</td>
	               		<td>{$v.reward}</td>
	               		<td>{$v.account}</td>
	               	</tr>
	            {/foreach}
	               </table>
                </div>
                <div class="show_hide">
                	<p>充值订单-详情</p>
                	<table border="1" cellspacing="0" cellpadding="0">
		               	<tr class="withdraw_width">
		               		<th>订单号</th>
		               		<th>订单时间</th>
		               		<th>充值金额</th>
		               		<th>充值状态</th>
		               		<th>冻结状态</th>

		               	</tr>
		               	{foreach recharge as $v}
			               	<tr>
			               		<td>{$v.rec_num}</td>
			               		<td>{$v.rec_time}</td>
			               		<td>{$v.sum}</td>
			               		<td>{$v.status?'充值成功':'待充值'}</td>
			               		<td>
			               			{if condition="$v.status"}
			               				{if condition="$v.con_status"}
			               					冻结中
			               				{else/}
			               					已释放
			               				{/if}
			               			{else/}
			               			{/if}
			               		</td>
			               	</tr>
		               	{/foreach}
	               </table>
                </div>
                <div class="show_hide withdraw">
                	<p>提现记录-详情</p>
                	<table border="1" cellspacing="0" cellpadding="0">
		               	<tr class="withdraw_width">
		               		<th>订单号</th>
		               		<th>时间</th>
		               		<th>金额</th>
		               		<th>交易状态</th>
		               		<th>提现账号</th>
		               	</tr>
		               	{foreach $draw as $v}
		               	<tr>
		               		<td>{$v.rec_num}</td>
		               		<td>{$v.rec_time}</td>
		               		<td>{$v.rec_paper}</td>
		               		<td>{$v.status?'已处理':'待处理'}</td>
		               		<td>{$v.bank_num}</td>
		               	</tr>
		               	{/foreach}
	               </table>
                </div>
            </div>    
		</div>
		
		
		<ul class="click" id='earnings_click'>
			<li class="btn_service"><img src="/static/img/service.png" alt="客服" /><br />客服</li>
			<li class="app_red_letter_btn"><img src="/static/img/new_hand.png" alt="新手" /><br />新手</li>
			<li class="app_red_letter_btn"><img src="/static/img/letter、.png" alt="信" /><br />信</li>
		</ul>
	</div>
{/block}
{block name='box'}
	<div class="big">
		<div class="rgerster">
			<h3>注册新用户</h3>
			<div class="gb">
				<img src="/static/img/cancel.png"/>
			</div>
			<div>
				<p><span>*</span>手机号</p>
				<input type="text" name="mobile" placeholder="请输入您的手机号"/>	
			</div>
			<div>
				<div onclick="verifyimg('{:captcha_src()}')"><img src="{:captcha_src()}" class="verifyimg" alt="captcha" style="display: inline-block;float: right;" /></div>
				<input type="text" name="verify" style="width: 30%;margin: 0 0 0 -20px" placeholder="请输入验证码"/>		
			</div>
			<div>
				<span style="color: red;">*</span>
				<input type="text" style="width: 49%;" name = "code" placeholder="请输入短信" />
				<input type="button" value="发送验证码" style="width: 30%;margin: 10px 0 0 5% 
					background: #FFFFFF;text-indent:5px;" onclick='code(this,"{:url('index/index/code')}","{:captcha_src()}")' />				
			</div>
			<div>
				<p><span>*</span>登录密码</p>
				<input type="password" name="password" placeholder="首字母为大写的8-18位字符" />	
			</div>
			<div>
				<p><span>*</span>重复密码</p>
				<input type="password" name="rpwd" placeholder="请再次输入密码"/>
			</div>
			<div>
				<p><span>*</span>推荐人</p>
				<input type="text" name = 'pmobile' placeholder="推荐人手机号"/>	
			</div>
			<div >
				<p>微信/QQ</p>
				<input type="text" name="QQaccount"  placeholder="请输入您的微信号或QQ号"/>				
			</div>
			<div class="dxk" style="margin: -20px 0 0 0;">
				<input type="checkbox" name="read" value="Y" style="width: 12px;"  style="display: inline-block;margin:  0 0 0 20px;"/>
				<p class="wf">我已阅读并同意（服务协议）</p>
			</div>
			<div>
				<button onclick='signup(this,"{:url('index/index/signup')}")'>确认</button>				
			</div>
		</div>
	</div>
{/block}
{block name='script'}
	<script src="/static/js/earnings.js"></script>
{/block}